using System.Collections.Generic;
using System.Linq;

namespace WineCellar.Web.Helpers
{
    public static class ExtJsGridModelExtensions
    {
        public static void AddList(this ExtJsGridModel model, string dataIndex, string header, IEnumerable<string> options)
        {
            model.Add(dataIndex, header);
            model.ExtFilters.Last().DataType = "list";
            model.ExtFilters.Last().Options = options;
        }
    }
}